-- GENERATED SPELL FOR [Amani Bear Mount] --


function spell0_24217(pUnit, Event) --@Crunch Armor,n/a--
pUnit:FullCastSpellOnTarget(42747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24217', 6500, 1)
end

function spell1_24217(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(42745,pUnit)
pUnit:RegisterEvent('Sorts_24217', 12339, 1)
end

function Sorts_24217(pUnit, Event)
local choix_sorts_24217 = math.random(0, 1)
if choix_sorts_24217 == 0 then
pUnit:RegisterEvent('spell0_24217', 1, 1)
end
if choix_sorts_24217 == 1 then
pUnit:RegisterEvent('spell1_24217', 1, 1)
end
end

function mob24217_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24217', math.random(1500, 3000), 1)
end

function mob24217_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24217_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24217_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24217, 1, 'mob24217_Action')
RegisterUnitEvent(24217, 2, 'mob24217_Leave')
RegisterUnitEvent(24217, 3, 'mob24217_Kill')
RegisterUnitEvent(24217, 4, 'mob24217_Die')
